package com.example.demo.config;

import org.noear.redisx.RedisClient;
import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Configuration;
import org.noear.solon.annotation.Inject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * redis配置类
 *
 * @author raos
 * @date 2024-12-17
 */
@Configuration
public class RedisConfig {

    private final Logger logger = LoggerFactory.getLogger(getClass());

    /**
     * 获取redis连接客户端
     */
    @Bean
    public RedisClient redisClient(@Inject("${redis.db1}") RedisClient client) {
        return client;
    }

}
